<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopContractTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_contract', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('shop_id')->comment('商家id');
            $table->integer('contractor_id')->comment('签约人id');
            $table->string('photo')->comment('合约照片');
            $table->date('begin_date')->comment('合约开始时间');
            $table->date('end_date')->comment('合约结束时间');
            $table->tinyInteger('status')->default(1)->comment('状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('shop_contract');
    }
}
